package com.cjm.struts2.helloworld;

import org.apache.struts2.interceptor.ApplicationAware;

import java.util.Map;

/**
 * Created by tony on 2015/6/23.
 */
public class TestAwareAction implements ApplicationAware{

    public String execute(){
//        通过实现接口的方式获取web资源

        map.put("applicationKey2","applicationValue");
        return "success";
    }

    private Map<String, Object> map;

    @Override
    public void setApplication(Map<String, Object> map) {
        this.map = map;
    }
}
